# Is x a factor of y? # example program by JCA # Oct 2019 print("Welcome to is x a factor of y") while True: # All the indented code is in the while loop x = input("Enter x value: ") x = int(x) y = input("Enter y value: ") y = int(y) if ( y%x == 0): # another indent for the if print(x,"is a factor of",y) else: print(x,"is a not a factor of",y) again = input("Do another? y/n: ") if again == 'n': break # break terminates the while loop # The last line of code is not indented # the print statement only executes if the loop has terminated print("Thank you for using is x a factor of y")